package com.sellerSystem.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

/**
 * 
 * 主键，编号，名称，价格，售卖时间，类别（食品，饮料，生活用品等），折扣，数量，备注，
 */
@Entity
public class Commodity implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(nullable = false, unique = true)
	private Integer commodityId;
	// 商品名称
	private String commodityName;
	// 商品种类
	private String commodityKinds;
	// 商品价格
	private double commodityPrice;
	// 商品图片
	private String commodityPic; 
	// 商品提供者

	private String sellerName;

	// 商品质量保障
	private String commodityGuaranty;
	// 商品库存量
	private int commodityNumber;
	// 商品描述
	private String commodityDescribe;

	public String getSellerName() {
		return sellerName;
	}

	public void setSellerName(String sellerName) {
		this.sellerName = sellerName;
	}

	public String getCommodityKinds() {
		return commodityKinds;
	}

	public void setCommodityKinds(String commodityKinds) {
		this.commodityKinds = commodityKinds;
	}

	public double getCommodityPrice() {
		return commodityPrice;
	}

	public void setCommodityPrice(double commodityPrice) {
		this.commodityPrice = commodityPrice;
	}

	public String getCommodityPic() {
		return commodityPic;
	}

	public void setCommodityPic(String commodityPic) {
		this.commodityPic = commodityPic;
	}

	public String getCommodityGuaranty() {
		return commodityGuaranty;
	}

	public void setCommodityGuaranty(String commodityGuaranty) {
		this.commodityGuaranty = commodityGuaranty;
	}

	public int getCommodityNumber() {
		return commodityNumber;
	}

	public void setCommodityNumber(int commodityNumber) {
		this.commodityNumber = commodityNumber;
	}

	public String getCommodityDescribe() {
		return commodityDescribe;
	}

	public void setCommodityDescribe(String commodityDescribe) {
		this.commodityDescribe = commodityDescribe;
	}

	public Integer getCommodityId() {
		return commodityId;
	}

	public void setCommodityId(Integer commodityId) {
		this.commodityId = commodityId;
	}

	public String getCommodityName() {
		return commodityName;
	}

	public void setCommodityName(String commodityName) {
		this.commodityName = commodityName;
	}

	@Override
	public String toString() {
		return "Commodity [commodityId=" + commodityId + ", commodityName="
				+ commodityName + ", commodityKinds=" + commodityKinds
				+ ", commodityPrice=" + commodityPrice + ", commodityPic="
				+ commodityPic + ", sellerName=" + sellerName
				+ ", commodityGuaranty=" + commodityGuaranty
				+ ", commodityNumber=" + commodityNumber
				+ ", commodityDescribe=" + commodityDescribe + "]";
	}
	
	
}
